package top.honlnk.controller.time;

import lombok.extern.slf4j.Slf4j;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;
import top.honlnk.common.constant.PublicConstant;
import top.honlnk.service.PublicService;

@Slf4j
@RestController
public class updateDatabaseControllerTime implements Job {

    @Autowired
    private PublicService publicService;
    @Override
    public void execute(JobExecutionContext jobExecutionContext) {
        log.info(PublicConstant.TASK_START);
        publicService.updateDatabase();
        log.info(PublicConstant.TASK_END);
    }
}
